package com.hexu.event.service;

import com.hexu.event.dao.TicketHistoryDao;
import com.hexu.event.entity.TicketHistory;

import java.util.List;

public class TicketHistoryService {
    TicketHistoryDao ticketHistoryDao = new TicketHistoryDao();

    //添加购票历史
    public boolean addTicketHistory(TicketHistory ticketHistory){
        return ticketHistoryDao.addTicketHistory(ticketHistory);
    }

    //返回一个用户的购票历史
    public List< TicketHistory> getAUserTicketHistory(String phoneNumber){
        return ticketHistoryDao.getAUserTicketHistory(phoneNumber);
    }

    //返回一个用户购买历史的门票数量
    public int aUserTicketNumber(String phoneNumber){
        return ticketHistoryDao.aUserTicketNumber(phoneNumber);
    }

    //返回所有用户的购票历史
    public List< TicketHistory> getAllUserTicketHistory(){
        return ticketHistoryDao.getAllUserTicketHistory();
    }

    //返回所有用户购买历史的门票数量
    public int allUserTicketNumber(){
        return ticketHistoryDao.allUserTicketNumber();
    }
}
